import http from "../http/index"

export default {
    select:{ 
        name: '商品查询',
        url: '/api/product',
        call: async function (params: any ={}) { 
           return await http.get(this.url,params)
        }
    },
    insert: {
        name: '商品添加',
        url: '/api/product',
        call: async function (params: any = {}) {
            return await http.post(this.url, params)
        }
    },
    update: {
        name: '商品更新',
        url: '/api/product',
        call: async function (params: any = {}) {
            return await http.put(this.url, params)
        }
    },
    delete: {
        name: '商品删除',
        url: '/api/product',
        call: async function (params: any = {}) {
            return await http.delete(this.url, params)
        }
    },
    patch: {
        name: '商品状态',
        url: '/api/product',
        call: async function (params: any = {}) {
            return await http.patch(this.url, params)
        }
    }
}